Minus prefix should also remove leading space#13
Merged
alphp merged 3 commits intoalphp:masterfrom Jan 26, 2024
Merged
Conversation
Standard PHP strftime() also remove leading space when using the minus prefix.
splitbrain
added a commit
to splitbrain/strftime
that referenced
this pull request
May 20, 2025
* master: Update PHPDoc: missing throws InvalidArgumentException Don't override the timezone when called with a DateTime object Add locale-param to PHPDoc-block (alphp#20) Use Locale::getDefault() before setlocale(LC_TIME, '0') Minus prefix should also remove leading space (alphp#13) use "standalone" names for month and day. fixes alphp#12
alphp
added a commit
that referenced
this pull request
May 20, 2025
* use "standalone" names for month and day. fixes #12 * Minus prefix should also remove leading space (#13) * Minus prefix should also remove space Standard PHP strftime() also remove leading space when using the minus prefix. * Add asserts for test '%#e' and '%-e' --------- Co-authored-by: Fernando Herrero <ininflamable@gmail.com> * Use Locale::getDefault() before setlocale(LC_TIME, '0') * Add locale-param to PHPDoc-block (#20) * Don't override the timezone when called with a DateTime object * Update PHPDoc: missing throws InvalidArgumentException --------- Co-authored-by: Fernando Herrero <alphp@users.noreply.github.com> Co-authored-by: maqc1 <alex--223@hotmail.com> Co-authored-by: Fernando Herrero <ininflamable@gmail.com> Co-authored-by: alexgit2k <alexgit2k@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Default PHP strftime() also remove leading space when using the minus prefix.
Expected result :
'%-e' => '3'
Actual result :
'%-e' => ' 3'